<template>
  <div>
    <div class="payBody">
      <div class="banner">
        <div class="content">
          <div class="el-icon-success icon"></div>
          <div class="info">支付成功</div>
          <p class="time">{{time}}秒</p>
        </div>
      </div>
      <hr>
    </div>
  </div>
</template>
<script>
export default {
  name:'paySuccess',
  data(){
    return {
      time:3,
    }
  },
  mounted(){
    let e = setInterval(()=>{
      if(--this.time<1){
        clearInterval(e)
      }
    },1000)
    setTimeout(() => {
      this.$router.push({path:'/'})
    }, 3000);
    this.utils.tips.success("3秒后自动跳转到首页")
  }
}
</script>
<style lang="less">
.payBody{
  .banner{
    margin-top: 20px;
    font-size: 20px;
    padding: 20px;
    font-family: '微软雅黑';
    .content{
      display: flex;
      justify-content: center;
      font-size: 50px;
      color: green;
      .icon{
        position: relative;
        top: 10px;
      }
      .info{
        height: 70px;
      }
      .time{
        margin: 0;
        margin-top: 70px;
        position: relative;
        right: 180px;
        font-size: 18px;
        color:black
      }
    }
  }
}
</style>